USE [CallCenter]
GO

/****** Object:  Table [dbo].[HistoryProspect]    Script Date: 07/09/2013 19:43:42 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[HistoryProspect](
	[HistoryID] [int] NOT NULL,
	[GuestID] [int] NOT NULL,
	[SaleID] [int] NOT NULL,
	[TitleNote] [varchar](50) NOT NULL,
	[Note] [varchar](100) NOT NULL,
	[Date] [datetime] NOT NULL,
 CONSTRAINT [PK_HistoryProspect] PRIMARY KEY CLUSTERED 
(
	[HistoryID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[HistoryProspect]  WITH CHECK ADD  CONSTRAINT [FK_HistoryProspect_Guests] FOREIGN KEY([GuestID])
REFERENCES [dbo].[Guests] ([GuestID])
GO

ALTER TABLE [dbo].[HistoryProspect] CHECK CONSTRAINT [FK_HistoryProspect_Guests]
GO

ALTER TABLE [dbo].[HistoryProspect]  WITH CHECK ADD  CONSTRAINT [FK_HistoryProspect_Sales] FOREIGN KEY([SaleID])
REFERENCES [dbo].[Sales] ([SaleID])
GO

ALTER TABLE [dbo].[HistoryProspect] CHECK CONSTRAINT [FK_HistoryProspect_Sales]
GO

